package com.hb.trade.client.expert;

import com.hb.core.pojo.expert.dto.*;
import com.hb.core.pojo.expert.entity.ExpertMajor;
import com.hb.core.pojo.expert.entity.ExpertUser;
import com.hb.core.pojo.parent.PageResult;
import org.fzzn.core.model.msg.Message;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 专家库Feign
 *
 * @author jinhaolin
 * @date 2022/1/18 10:05
 * @updater ljs
 **/
@FeignClient("hb-expert")
public interface ExpertClient {

    /**
     * 抽取专家
     *
     * @param expertExtractParam
     * @return
     */
    @PostMapping("/expert/expertExtract")
    Message<List<ExpertDTO>> expertExtract(@RequestBody ExpertExtractParam expertExtractParam);

    /**
     * 根据父类code获取专业列表
     *
     * @param expertMajorDTO
     * @return
     */
    @PostMapping("/expert/majorList")
    List<ExpertMajorDTO> majorList(@RequestBody ExpertMajorDTO expertMajorDTO);

    /**
     * 获取全部专业列表
     *
     * @param expertMajorDTO
     * @return
     */
    @PostMapping("/expert/allMajorList")
    List<ExpertMajorDTO> allMajorList(@RequestBody ExpertMajorDTO expertMajorDTO);


    /**
     * 搜索专家
     *
     * @param expertDTO
     * @return
     */
    @PostMapping("/expert/searchExpert")
    PageResult<ExpertDTO> expertSearch(@RequestBody ExpertDTO expertDTO);

    /**
     * 全部专家
     *
     * @param expertDTO
     * @return
     */
    @PostMapping("/expert/expertAll")
    Message expertAll(@RequestBody ExpertDTO expertDTO);


    /**
     * 保存专家，添加专家信息
     *
     * @param expertDTO
     * @return
     * @author: ljs
     * @date: 2022-2-10 11:20:01
     */
    @PostMapping("/expert/expertSave")
    Message expertSave(@RequestBody ExpertDTO expertDTO);

    /**
     * 更新专家信息
     *
     * @param expertDTO
     * @return
     * @author: ljs
     * @date: 2022-2-10 11:20:01
     */
    @PostMapping("/expert/expertUpdate")
    Message expertUpdate(@RequestBody ExpertDTO expertDTO);

    /**
     * 删除专家信息
     *
     * @param expertDTO
     * @return
     * @author: ljs
     * @date: 2022-2-10 11:20:01
     */
    @PostMapping("/expert/expertDelete")
    Message expertDelete(@RequestBody ExpertDTO expertDTO);

    /**
     * 导入专家信息
     *
     * @param expertDTOList
     * @return
     * @author: ljs
     * @date: 2022-2-10 11:20:01
     */
    @PostMapping("/expert/expertImport")
    Message expertImport(@RequestBody List<ExpertDTO> expertDTOList);

    /**
     * 保存专家组信息
     *
     * @param expertGroupDTO
     * @return
     */
    @PostMapping("/expert/expertGroupSave")
    Message expertGroupSave(@RequestBody ExpertGroupDTO expertGroupDTO);


    /**
     * 查询专家组列表
     *
     * @param expertGroupDTO
     * @return
     */
    @PostMapping("/expert/expertGroupList")
    Message expertGroupList(@RequestBody ExpertGroupDTO expertGroupDTO);

    /**
     * 查询专家组详情
     *
     * @param expertGroupDTO
     * @return
     */
    @PostMapping("/expert/expertGroupDetail")
    Message<ExpertGroupDTO> expertGroupDetail(@RequestBody ExpertGroupDTO expertGroupDTO);

    /**
     * 删除专家组
     *
     * @param expertGroupDTO
     * @return
     */
    @PostMapping("/expert/expertGroupDelete")
    Message expertGroupDelete(@RequestBody ExpertGroupDTO expertGroupDTO);

    /**
     * 查询专家系统账号信息
     *
     * @param expertUser
     * @return
     */
    @PostMapping("/expert/getExpertUser")
    Message<ExpertUser> getExpertUser(@RequestBody ExpertUser expertUser);

    /**
     * 新增一个专家系统账号信息
     *
     * @param expertUser
     * @return
     */
    @PostMapping("/expert/expertUserSave")
    Message<Boolean> expertUserSave(@RequestBody ExpertUser expertUser);

    /**
     * 删除一个专家系统账号信息
     *
     * @param expertUser
     * @return
     */
    @PostMapping("/expert/expertUserDelete")
    Message<Boolean> expertUserDelete(@RequestBody ExpertUser expertUser);

    /**
     * 修改专家抽取系统账号信息
     *
     * @param expertUser
     * @return
     */
    @PostMapping("/expert/expertUserUpdate")
    Message<Boolean> expertUserUpdate(@RequestBody ExpertUser expertUser);

    /**
     * 根据用户名查询该用户的信息
     *
     * @param userName
     * @return
     */
    @PostMapping("/expert/expertUserSearchByUserName")
    Message<ExpertUser> expertUserSearchByUserName(@RequestBody String userName);


    /**
     * 查询抽取专家的记录
     *
     * @param expertGroupMembersDTO
     * @return org.fzzn.core.model.msg.Message<java.util.List < com.hb.core.pojo.expert.dto.ExpertGroupMembersDTO>>
     * @author tian
     * @date 2022-4-14 16:38
     */
    @PostMapping("/expert/selectExpertGroupMembersByGroupId")
    Message<List<ExpertGroupMembersDTO>> selectExpertGroupMembersByGroupId(@RequestBody ExpertGroupMembersDTO expertGroupMembersDTO);


    /**
     * 补抽专家
     *
     * @param expertGroupMembersDTO
     * @return org.fzzn.core.model.msg.Message<com.hb.core.pojo.expert.dto.ExpertGroupMembersDTO>
     * @author tian
     * @date 2022-4-14 16:39
     */
    @PostMapping("/expert/supplementExtract")
    Message<String> supplementExtract(@RequestBody ExpertGroupMembersDTO expertGroupMembersDTO);

    /**
     * 判断指定企业是否拥有私有专家帐号
     *
     * @param orgId 企业ID
     * @return
     * @author zhaojk
     */
    @PostMapping("/expert/existsByOrgId")
    Message<Boolean> existsByOrgId(Long orgId);

    /**
     * 判断指定企业是否拥有私有专家帐号
     *
     * @param orgId 企业ID
     * @return
     * @author zhaojk
     */
    @PostMapping("/expert/getByOrgId")
    Message<ExpertUser> getByOrgId(@RequestParam Long orgId);
}
